package com.me.myFramework.myAop.aop200;

import com.me.myFramework.myAop.aop200.advice.Advice;
import org.springframework.aop.Pointcut;

/**
 * 匹配所有方法的 切面对象，包含了一个 pointcut（切点表达式）和 advice（增强逻辑、织入到哪，如：方法执行前）
 *
 * @author ME
 */
public class DefaultPointcutAdvisor implements PointcutAdvisor {

    private final Advice advice;
    private final Pointcut pointcut;

    public DefaultPointcutAdvisor(Advice advice, Pointcut pointcut) {
        this.advice = advice;
        this.pointcut = pointcut;
    }

    @Override
    public Advice getAdvice() {
        return advice;
    }

    @Override
    public Pointcut getPointcut() {
        return pointcut;
    }
}
